<template>
  <view class="my-search-container" :style="{backgroundColor:bgColor}">
    <view class="my-search-box" :style="{borderRadius:radious+'px'}" @click="searchBoxClickHandel">
     <uni-icons type="search" size="17"></uni-icons>
      <text class="placeholder">搜索</text>
      </view>
    </view>
  </view>
</template>

<script>
  export default {
    name:"my-search",
    props:{
      bgColor:{
        type:String,
        default:'#c00000'
      },
      radious:{
        type:Number,
        default:18
      }
    },
    data() {
      return {
        
      };
    },
    methods:{
      searchBoxClickHandel(){
        this.$emit('click')
      }
    }
  }
</script>

<style lang="scss">
.my-search-container {
  display: flex;
  justify-content: center;
  align-items: center;
  // background-color: #c00000;
  height: 50px;
  .my-search-box {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    // border-radius: 18px;
    height: 36px;
    background-color: #ffffff;
    .placeholder {
     font-size: 15px;
     margin-left: 5px;
    }
  }
}
</style>